package pl.jdeveloper.derivato;

import pl.jdeveloper.derivato.domain.NewtonPolynominal;
import pl.jdeveloper.derivato.model.Derivative;


public class NewtonDerivative extends Derivative{
	
	NewtonPolynominal newtonPolynominal;

	@Override
	public double getValue(double arg) {
		double value;
		value= newtonPolynominal.horner(arg, 0);
		return value;
	}

	public NewtonDerivative() {
		super();
	}

	public NewtonPolynominal getNewton() {
		return newtonPolynominal;
	}

	public void setNewton(NewtonPolynominal newton) {
		this.newtonPolynominal = newton;
	}
	
	
}
